// components/topBar/topBar.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    back: {
      type: Boolean,
      value: false
    },

    userInfo: {
      type: Object,
      value: {}
    },
    setting: {
      type: Object,
      value: {}
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    showmodal: false,
    capsule: app.globalData.capsule,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getUserInfo() {
      this.triggerEvent("getUserInfo");
    },
    hideModal: function () {
      this.setData({
        showmodal: false
      });
    },
    showModal(e) {
      this.setData({
        showmodal: e.currentTarget.dataset.id
      });
    },
  },

})